package com.resource.project.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.resource.project.entity.RespBean;
import com.resource.project.entity.TResource;
import com.resource.project.mapper.TResourceMapper;
import com.resource.project.service.ITResourceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.resource.util.page.PageParam;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 物料表 服务实现类
 * </p>
 *
 * @author resource
 * @since 2020-12-08
 */
@Service
public class TResourceServiceImpl extends ServiceImpl<TResourceMapper, TResource> implements ITResourceService {

    @Override
    public IPage<TResource> page(PageParam pageParam, TResource resource) {
        return page(pageParam.toMybaitsPage(),Wrappers.<TResource>emptyWrapper());
    }

    @Override
    public RespBean add(TResource resource) {
        return RespBean.ok(save(resource));
    }

    @Override
    public RespBean updateTResource(TResource resource) {
        return null;
    }
}
